﻿@{
    ViewBag.Title = "" + FOResource.UI.Product.Deposit.depositsavingcurrency + "";
    Layout = "~/Views/Shared/_SUBLayout1.cshtml";
    var Cate = (List<FOModels.DepositSaving.DepositSavingCateModels>)ViewBag.DepositSavingCate;
    var currency = (List<FOModels.DepositSavingCurrency.CurrencyCateModels>)ViewBag.CurrencyCate;
    var saving = (List<FOModels.DepositSavingCurrency.DepositSavingCurrencyModels>)ViewBag.DepositSavingCurrency;
    var i = 1;
    double lai = 0;
    var ProDes = (FOModels.Product.ProductModels)ViewBag.ProDes;
}
<style>
    .slider1 {
        background: #144060 !important;
        height: 7px !important;
        position: relative;
        cursor: pointer;
        border: 1px solid #333 !important;
        width: 280px !important;
        float: left !important;
        clear: right !important;
        margin-top: 10px !important;
        margin-bottom: 30px !important;
        border-radius: 5px !important;
        -moz-border-radius: 5px !important;
        -webkit-border-radius: 5px !important;
        box-shadow: inset 0 0 8px #000 !important;
        -webkit-box-shadow: inset 0 0 8px #000 !important;
    }

    #vn-box {
        margin-left: 20px;
    }

    .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
        background: #fff url("../Content/images/h30.png") repeat-x 0 0;
        height: 20px;
        width: 20px;
        top: -10px;
        position: absolute;
        display: block;
        margin-top: 1px;
        border: 1px solid #000;
        cursor: move;
        box-shadow: 0 0 6px #000;
        -moz-box-shadow: 0 0 6px #000;
        -webkit-box-shadow: 0 0 6px #000;
        border-radius: 14px;
        -moz-border-radius: 14px;
        -webkit-border-radius: 14px;
        margin-left: -.6em;
    }

    .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
        background: #fff url("../Content/images/h30.png") repeat-x 0 0;
        height: 20px;
        width: 20px;
        top: -10px;
        position: absolute;
        display: block;
        margin-top: 1px;
        border: 1px solid #000;
        cursor: move;
        box-shadow: 0 0 6px #000;
        -moz-box-shadow: 0 0 6px #000;
        -webkit-box-shadow: 0 0 6px #000;
        border-radius: 14px;
        -moz-border-radius: 14px;
        -webkit-border-radius: 14px;
        margin-left: -.6em;
    }
</style>
<script src="@Url.Content("~/Content/js/jquery-ui.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/js/jquery-1.9.1.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/js/jquery-ui.js")" type="text/javascript"></script>
<script type="text/javascript" src="@Url.Content("~/Content/js/jquery.smoothDivScroll-1.0.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Content/js/jquery.smoothDivScroll-1.0-min.js")"></script>
<script src="@Url.Content("~/Content/js/jquery.fancybox.js")" type="text/javascript"></script>
<script type="text/javascript">
    function number_format(number, decimals, dec_point, thousands_sep) {

        var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;
        var d = dec_point == undefined ? "," : dec_point;
        var t = thousands_sep == undefined ? "." : thousands_sep, s = n < 0 ? "-" : "";
        var i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0;

        return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
    }
    function convertounsign(str) {
        str = str.toLowerCase();
        str = str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, "a");
        str = str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, "e");
        str = str.replace(/ì|í|ị|ỉ|ĩ/g, "i");
        str = str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, "o");
        str = str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, "u");
        str = str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g, "y");
        str = str.replace(/đ/g, "d");
        str = str.replace(/!|%|\^|\*|\(|\)|\+|\=|\<|\>|\?|\/|,|\.|\:|\;|\'| |\"|\&|\#|\[|\]|~|$|_/g, "-");
        /* tìm và thay thế các kí tự đặc biệt trong chuỗi sang kí tự - */
        str = str.replace(/-+-/g, "-"); //thay thế 2- thành 1- 
        str = str.replace(/^\-+|\-+$/g, "");
        //cắt bỏ ký tự - ở đầu và cuối chuỗi  
        return str;
    }
    $(document).ready(function () {
        var lang = $("#CurrentLangCode").html();
        if (lang == "vi-VN") {
            $("#amount-currency").change(function () {
                var a = $(this).val().replace(".", "").replace(".", "");
                var max = $("#slider_amount").slider("option", "max");
                var min = $("#slider_amount").slider("option", "min");
                $("#slider_amount").slider("value", a);
                if (a > max) {
                    $("#amount-currency").val($("#slider_amount").slider("option", "max"));
                }
                if (a < min) {
                    $("#amount-currency").val($("#slider_amount").slider("option", "min"));
                }
                var AppUrl = $("#AppUrl").text();
                var val_currencyid = parseInt($("#select-currency").attr("rel"));
                a = $(this).val().replace(".", "").replace(".", "").replace(".", "");
                var val = parseInt(a);
                var val_cate = parseInt($("#rel_cate").attr("rel"));
                if ($("#years-currency").val() < 1) {
                    var val_month = $("#month-currency").val();
                }
                else {
                    var val_month = $("#years-currency").val() * 12;
                }
                var val_currencyid = parseInt($("#select-currency").attr("rel"));
                var lai = 0;
                var ba = parseFloat(val);
                $("#amount-currency").val(number_format(a, 0, ",", "."));
                $.ajax({
                    type: "post",
                    url: AppUrl + "/DepositSavingCurrency/getDepositSaving",
                    data: { cateid: val_cate, currencyid: val_currencyid, balance: val, month: val_month },
                    dataType: "json",
                    success: function (rvdata) {
                        var htmlcode = "";
                        if (rvdata.length > 0) {
                            $(rvdata).each(function (index, item) {
                                if (val_cate == 1) {
                                    if (val_currencyid == 1) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                        }
                                        else {
                                            htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD.toString().replace(".", ",") + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = Math.pow(1 + ((item.InterestUSD) / 100 / 12), val_month);
                                            var ina = Math.round(parseFloat(lai * ba));
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ",", ".")) + "</p>";
                                            }
                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Chi phí</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Thông tin thêm</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else if (val_currencyid == 2) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                        }
                                        else {
                                            htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestEUR != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR.toString().replace(".", ",") + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = Math.pow(1 + ((item.InterestEUR) / 100 / 12), val_month);
                                            var ina = Math.round(parseFloat(lai * ba));
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ".")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Chi phí</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Thông tin thêm</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else { }

                                }
                                else {
                                    if (val_currencyid == 1) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                        }
                                        else {
                                            htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD.toString().replace(".", ",") + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = val * val_month * ((item.InterestUSD) / 100 / 12);
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ",", ".")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Chi phí</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Thông tin thêm</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else if (val_currencyid == 2) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                        }
                                        else {
                                            htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR.toString().replace(".", ",") + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = val * val_month * ((item.InterestEUR) / 100 / 12);
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ",", ".")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Chi phí</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Thông tin thêm</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else { }
                                }
                            });
                        }// lenght
                        else {
                            htmlcode += "<tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>Không có dữ liệu phù hợp</p></td></tr>";
                            $("#product-table tbody").html(htmlcode);
                        }
                        $("#product-table tbody").html("");
                        $("#product-table tbody").append(htmlcode);
                        $("#product-table").trigger("update");
                        $('tbody > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
                    }
                });
            });
            $("#years-currency, #month-currency").change(function () {
                var years = parseInt($('#years-currency').val(), 10);
                var months = 0;
                var val_month = 0;
                if (years < 1) {
                    months = parseInt($('#month-currency').val(), 10);
                }
                else {
                    months = years + 11;
                }
                var a = months;
                $("#slider_year").slider("value", a);
                var max = $("#slider_year").slider("option", "max");
                var min = $("#slider_year").slider("option", "min");
                if (a > max) {
                    $("#years-currency").val($("#slider_year").slider("option", "max"));
                }
                if (a < min) {
                    $("#years-currency").val($("#slider_year").slider("option", "min"));
                }
                var AppUrl = $("#AppUrl").text();
                var val_currencyid = parseInt($("#select-currency").attr("rel"));
                var val = parseInt($("#amount-currency").val().replace(".", "").replace(".", "").replace(".", ""));
                var val_cate = parseInt($("#rel_cate").attr("rel"));
                var val_currencyid = parseInt($("#select-currency").attr("rel"));
                var lai = 0;
                var values = $("#slider_year").slider("value");
                if (values < 12) {
                    $("#month-currency").val(values);
                    $("#years-currency").val(0);
                    val_month = $("#month-currency").val();
                }
                else {
                    $("#years-currency").val(values - 11);
                    $("#month-currency").val(0);
                    val_month = (values - 11) * 12;
                }
                var ba = parseFloat(val);
                $.ajax({
                    type: "post",
                    url: AppUrl + "/DepositSavingCurrency/getDepositSaving",
                    data: { cateid: val_cate, currencyid: val_currencyid, balance: val, month: val_month },
                    dataType: "json",
                    success: function (rvdata) {
                        var htmlcode = "";
                        if (rvdata.length > 0) {
                            $(rvdata).each(function (index, item) {
                                if (val_cate == 1) {
                                    if (val_currencyid == 1) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                        }
                                        else {
                                            htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD.toString().replace(".", ",") + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = Math.pow(1 + ((item.InterestUSD) / 100 / 12), val_month);
                                            var ina = Math.round(parseFloat(lai * ba));
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ",", ".")) + "</p>";
                                            }
                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Chi phí</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Thông tin thêm</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else if (val_currencyid == 2) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                        }
                                        else {
                                            htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestEUR != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR.toString().replace(".", ",") + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = Math.pow(1 + ((item.InterestEUR) / 100 / 12), val_month);
                                            var ina = Math.round(parseFloat(lai * ba));
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ".")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Chi phí</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Thông tin thêm</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else { }

                                }
                                else {
                                    if (val_currencyid == 1) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                        }
                                        else {
                                            htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD.toString().replace(".", ",") + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = val * val_month * ((item.InterestUSD) / 100 / 12);
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ",", ".")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Chi phí</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Thông tin thêm</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else if (val_currencyid == 2) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                        }
                                        else {
                                            htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR.toString().replace(".", ",") + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = val * val_month * ((item.InterestEUR) / 100 / 12);
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ",", ".")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Chi phí</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Thông tin thêm</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else { }
                                }
                            });
                        }// lenght
                        else {
                            htmlcode += "<tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>Không có dữ liệu phù hợp</p></td></tr>";
                            $("#product-table tbody").html(htmlcode);
                        }
                        $("#product-table tbody").html("");
                        $("#product-table tbody").append(htmlcode);
                        $("#product-table").trigger("update");
                        $('tbody > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
                    }
                });
            });
        }
        else {
            $("#amount-currency").change(function () {
                var a = $(this).val().replace(",", "").replace(",", "");
                var max = $("#slider_amount").slider("option", "max");
                var min = $("#slider_amount").slider("option", "min");
                $("#slider_amount").slider("value", a);
                if (a > max) {
                    $("#amount-currency").val($("#slider_amount").slider("option", "max"));
                }
                if (a < min) {
                    $("#amount-currency").val($("#slider_amount").slider("option", "min"));
                }
                var AppUrl = $("#AppUrl").text();
                var val_currencyid = parseInt($("#select-currency").attr("rel"));
                a = $(this).val().replace(",", "").replace(",", "").replace(",", "");
                var val = parseInt(a);
                var val_cate = parseInt($("#rel_cate").attr("rel"));
                if ($("#years-currency").val() < 1) {
                    var val_month = $("#month-currency").val();
                }
                else {
                    var val_month = $("#years-currency").val() * 12;
                }
                var val_currencyid = parseInt($("#select-currency").attr("rel"));
                var lai = 0;
                var ba = parseFloat(val);
                $("#amount-currency").val(number_format(a, 0, ".", ","));
                $.ajax({
                    type: "post",
                    url: AppUrl + "/DepositSavingCurrency/getDepositSaving",
                    data: { cateid: val_cate, currencyid: val_currencyid, balance: val, month: val_month },
                    dataType: "json",
                    success: function (rvdata) {
                        var htmlcode = "";
                        if (rvdata.length > 0) {
                            $(rvdata).each(function (index, item) {
                                if (val_cate == 1) {

                                    if (val_currencyid == 1) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            if (val_month == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                            }
                                        }
                                        else {
                                            if (val_month / 12 == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                            }
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = Math.pow(1 + ((item.InterestUSD) / 100 / 12), val_month);
                                            var ina = Math.round(parseFloat(lai * ba));
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ",")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Benefit & Feature</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Fees</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>More Infomation</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else if (val_currencyid == 2) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            if (val_month == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                            }
                                        }
                                        else {
                                            if (val_month / 12 == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                            }
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestEUR != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = Math.pow(1 + ((item.InterestEUR) / 100 / 12), val_month);
                                            var ina = Math.round(parseFloat(lai * ba));
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ",")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Benefit & Feature</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Fees</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>More Infomation</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else { }

                                }
                                else {

                                    if (val_currencyid == 1) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            if (val_month == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                            }
                                        }
                                        else {
                                            if (val_month / 12 == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                            }
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = val * val_month * ((item.InterestUSD) / 100 / 12);
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ".", ",")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Benefit & Feature</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Fees</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>More Infomation</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else if (val_currencyid == 2) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            if (val_month == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                            }
                                        }
                                        else {
                                            if (val_month / 12 == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                            }
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestEUR != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = val * val_month * ((item.InterestEUR) / 100 / 12);
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ".", ",")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Benefit & Feature</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Fees</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>More Infomation</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else { }
                                }
                            });
                        }// lenght
                        else {
                            htmlcode += "<tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>No result</p></td></tr>";
                            $("#product-table tbody").html(htmlcode);
                        }
                        $("#product-table tbody").html("");
                        $("#product-table tbody").append(htmlcode);
                        $("#product-table").trigger("update");
                        $('tbody > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
                    }
                });
            });
            $("#years-currency, #month-currency").change(function () {
                var years = parseInt($('#years-currency').val(), 10);
                var months = 0;
                if (years < 1) {
                    months = parseInt($('#month-currency').val(), 10);
                }
                else {
                    months = years + 11;
                }
                var a = months;
                $("#slider_year").slider("value", a);
                var max = $("#slider_year").slider("option", "max");
                var min = $("#slider_year").slider("option", "min");
                if (a > max) {
                    $("#years-currency").val($("#slider_year").slider("option", "max"));
                }
                if (a < min) {
                    $("#years-currency").val($("#slider_year").slider("option", "min"));
                }
                var AppUrl = $("#AppUrl").text();
                var val_currencyid = parseInt($("#select-currency").attr("rel"));
                var val = parseInt($("#amount-currency").val().replace(",", "").replace(",", "").replace(",", ""));
                var val_cate = parseInt($("#rel_cate").attr("rel"));
                var val_currencyid = parseInt($("#select-currency").attr("rel"));
                var lai = 0;
                var values = $("#slider_year").slider("value");
                if (values < 12) {
                    $("#month-currency").val(values);
                    $("#years-currency").val(0);
                    val_month = $("#month-currency").val();
                }
                else {
                    $("#years-currency").val(values - 11);
                    $("#month-currency").val(0);
                    val_month = (values - 11) * 12;
                }
                var ba = parseFloat(val);
                $.ajax({
                    type: "post",
                    url: AppUrl + "/DepositSavingCurrency/getDepositSaving",
                    data: { cateid: val_cate, currencyid: val_currencyid, balance: val, month: val_month },
                    dataType: "json",
                    success: function (rvdata) {
                        var htmlcode = "";
                        if (rvdata.length > 0) {
                            $(rvdata).each(function (index, item) {
                                if (val_cate == 1) {

                                    if (val_currencyid == 1) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            if (val_month == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                            }
                                        }
                                        else {
                                            if (val_month / 12 == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                            }
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = Math.pow(1 + ((item.InterestUSD) / 100 / 12), val_month);
                                            var ina = Math.round(parseFloat(lai * ba));
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ",")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Benefit & Feature</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Fees</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>More Infomation</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else if (val_currencyid == 2) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            if (val_month == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                            }
                                        }
                                        else {
                                            if (val_month / 12 == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                            }
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestEUR != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = Math.pow(1 + ((item.InterestEUR) / 100 / 12), val_month);
                                            var ina = Math.round(parseFloat(lai * ba));
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ",")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Benefit & Feature</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Fees</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>More Infomation</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else { }

                                }
                                else {

                                    if (val_currencyid == 1) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            if (val_month == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                            }
                                        }
                                        else {
                                            if (val_month / 12 == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                            }
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestUSD != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = val * val_month * ((item.InterestUSD) / 100 / 12);
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ".", ",")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Benefit & Feature</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Fees</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>More Infomation</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else if (val_currencyid == 2) {
                                        htmlcode += "<tr>";
                                        htmlcode += " <td class='td-bank-saving'>";
                                        htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                        htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                        htmlcode += " </td>";
                                        htmlcode += " <td style='vertical-align:middle;'>";
                                        htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                        htmlcode += "</td>";
                                        htmlcode += " <td style='vertical-align: middle;'>";
                                        if (val_month < 12) {
                                            if (val_month == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                            }
                                        }
                                        else {
                                            if (val_month / 12 == 1) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                            }
                                        }
                                        htmlcode += "  </td>";
                                        if (item.InterestEUR != 0) {
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR + " %</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            lai = val * val_month * ((item.InterestEUR) / 100 / 12);
                                            if (ina < 999) {
                                                htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                            }
                                            else {
                                                htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ".", ",")) + "</p>";
                                            }

                                            htmlcode += " </td>";
                                        }
                                        else {
                                            htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                            htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                            htmlcode += " </td>";
                                        }
                                        htmlcode += " <td class='td-btn'>";
                                        htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                        htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                        htmlcode += "</td>";
                                        htmlcode += " </tr>";
                                        htmlcode += "</tr>";
                                        htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                        htmlcode += "<td colspan='6'>";
                                        htmlcode += " <div class='more-info-top' >";
                                        htmlcode += " <div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Benefit & Feature</h4>";
                                        htmlcode += "<div class='item-list'>";
                                        htmlcode += item.Benefit;
                                        htmlcode += "</div>";
                                        htmlcode += "</div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>Fees</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.FeeContent;
                                        htmlcode += "</div>";
                                        htmlcode += " </div>";
                                        htmlcode += "<div class='more-info-wrapper'>";
                                        htmlcode += "<h4>More Infomation</h4>";
                                        htmlcode += " <div class='item-list'>";
                                        htmlcode += item.MoreInfo;
                                        htmlcode += "</div>  ";
                                        htmlcode += " </div>";
                                        htmlcode += "</div>";
                                        htmlcode += "</td>";
                                        htmlcode += "</tr>";
                                    }
                                    else { }
                                }
                            });
                        }// lenght
                        else {
                            htmlcode += "<tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>No result</p></td></tr>";
                            $("#product-table tbody").html(htmlcode);
                        }
                        $("#product-table tbody").html("");
                        $("#product-table tbody").append(htmlcode);
                        $("#product-table").trigger("update");
                        $('tbody > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
                    }
                });
            });
        }
    });
    $(function () {
        var val = 0;
        var lang = $("#CurrentLangCode").html();
        if (lang == "vi-VN") {
            $("#slider_amount").slider({
                value: 1000000,
                min: 500,
                max: 2000000,
                step: 50,
                slide: function (event, ui) {

                    $("#amount-currency").val(number_format(ui.value, 0, ".", "."));
                    var AppUrl = $("#AppUrl").text();
                    val = $("#amount-currency").val().replace(".", "").replace(".", "");
                    var val_cate = parseInt($("#rel_cate").attr("rel"));
                    if ($("#years-currency").val() < 1) {
                        var val_month = $("#month-currency").val();
                    }
                    else {
                        var val_month = $("#years-currency").val() * 12;
                    }
                    var val_currencyid = parseInt($("#select-currency").attr("rel"));
                    var lai = 0;
                    var ba = parseFloat(val);
                    $.ajax({
                        type: "post",
                        url: AppUrl + "/DepositSavingCurrency/getDepositSaving",
                        data: { cateid: val_cate, currencyid: val_currencyid, balance: val, month: val_month },
                        dataType: "json",
                        success: function (rvdata) {
                            var htmlcode = "";
                            if (rvdata.length > 0) {
                                $(rvdata).each(function (index, item) {
                                    if (val_cate == 1) {
                                        if (val_currencyid == 1) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD.toString().replace(".", ",") + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = Math.pow(1 + ((item.InterestUSD) / 100 / 12), val_month);
                                                var ina = Math.round(parseFloat(lai * ba));
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ",", ".")) + "</p>";
                                                }
                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Chi phí</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Thông tin thêm</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else if (val_currencyid == 2) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestEUR != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR.toString().replace(".", ",") + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = Math.pow(1 + ((item.InterestEUR) / 100 / 12), val_month);
                                                var ina = Math.round(parseFloat(lai * ba));
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ".")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Chi phí</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Thông tin thêm</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else { }

                                    }
                                    else {
                                        if (val_currencyid == 1) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD.toString().replace(".", ",") + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = val * val_month * ((item.InterestUSD) / 100 / 12);
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ",", ".")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Chi phí</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Thông tin thêm</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else if (val_currencyid == 2) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR.toString().replace(".", ",") + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = val * val_month * ((item.InterestEUR) / 100 / 12);
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ",", ".")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Chi phí</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Thông tin thêm</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else { }
                                    }
                                });
                            }// lenght
                            else {
                                htmlcode += "<tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>Không có dữ liệu phù hợp</p></td></tr>";
                                $("#product-table tbody").html(htmlcode);
                            }
                            $("#product-table tbody").html("");
                            $("#product-table tbody").append(htmlcode);
                            $("#product-table").trigger("update");
                            $('tbody > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
                        }
                    });
                }
            });
            $("#amount-currency").val(number_format($("#slider_amount").slider("value"), 0, ",", "."));
            val = $("#slider_amount").slider("value");
        }
        else {
            $("#slider_amount").slider({
                value: 1000000,
                min: 500,
                max: 2000000,
                step: 50,
                slide: function (event, ui) {
                    $("#amount-currency").val(number_format(ui.value, 0, ".", ","));
                    var AppUrl = $("#AppUrl").text();
                    val = $("#amount-currency").val().replace(",", "").replace(",", "");
                    var val_cate = parseInt($("#rel_cate").attr("rel"));
                    if ($("#years-currency").val() < 1) {
                        var val_month = $("#month-currency").val();
                    }
                    else {
                        var val_month = $("#years-currency").val() * 12;
                    }
                    var val_currencyid = parseInt($("#select-currency").attr("rel"));
                    var lai = 0;
                    var ba = parseFloat(val);
                    $.ajax({
                        type: "post",
                        url: AppUrl + "/DepositSavingCurrency/getDepositSaving",
                        data: { cateid: val_cate, currencyid: val_currencyid, balance: val, month: val_month },
                        dataType: "json",
                        success: function (rvdata) {
                            var htmlcode = "";
                            if (rvdata.length > 0) {
                                $(rvdata).each(function (index, item) {
                                    if (val_cate == 1) {

                                        if (val_currencyid == 1) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                if (val_month == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                                }
                                            }
                                            else {
                                                if (val_month / 12 == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                                }
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = Math.pow(1 + ((item.InterestUSD) / 100 / 12), val_month);
                                                var ina = Math.round(parseFloat(lai * ba));
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ",")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Benefit & Feature</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Fees</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>More Infomation</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else if (val_currencyid == 2) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                if (val_month == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                                }
                                            }
                                            else {
                                                if (val_month / 12 == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                                }
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestEUR != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = Math.pow(1 + ((item.InterestEUR) / 100 / 12), val_month);
                                                var ina = Math.round(parseFloat(lai * ba));
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ",")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Benefit & Feature</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Fees</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>More Infomation</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else { }

                                    }
                                    else {

                                        if (val_currencyid == 1) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                if (val_month == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                                }
                                            }
                                            else {
                                                if (val_month / 12 == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                                }
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = val * val_month * ((item.InterestUSD) / 100 / 12);
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ".", ",")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Benefit & Feature</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Fees</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>More Infomation</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else if (val_currencyid == 2) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                if (val_month == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                                }
                                            }
                                            else {
                                                if (val_month / 12 == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                                }
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestEUR != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = val * val_month * ((item.InterestEUR) / 100 / 12);
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ".", ",")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Benefit & Feature</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Fees</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>More Infomation</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else { }
                                    }
                                });
                            }// lenght
                            else {
                                htmlcode += "<tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>No result</p></td></tr>";
                                $("#product-table tbody").html(htmlcode);
                            }
                            $("#product-table tbody").html("");
                            $("#product-table tbody").append(htmlcode);
                            $("#product-table").trigger("update");
                            $('tbody > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
                        }
                    });
                }
            });
            $("#amount-currency").val(number_format($("#slider_amount").slider("value"), 0, ".", ","));
            val = $("#slider_amount").slider("value");
        }
    });
    $(function () {
        var lang = $("#CurrentLangCode").html();
        var val_month = 0;
        if (lang == "vi-VN") {
            $("#slider_year").slider({
                value: 12,
                min: 1,
                max: 16,
                step: 1,
                slide: function (event, ui) {
                    var AppUrl = $("#AppUrl").text();
                    val = $("#amount-currency").val().replace(".", "").replace(".", "");
                    var val_cate = parseInt($("#rel_cate").attr("rel"));
                    var values = ui.value;
                    if (values < 12) {
                        $("#month-currency").val(values);
                        $("#years-currency").val(0);
                        val_month = $("#month-currency").val();
                    }
                    else {
                        $("#years-currency").val(values - 11);
                        $("#month-currency").val(0);
                        val_month = (values - 11) * 12;
                    }
                    var val_currencyid = parseInt($("#select-currency").attr("rel"));
                    var lai = 0;

                    var ba = parseFloat(val);
                    $.ajax({
                        type: "post",
                        url: AppUrl + "/DepositSavingCurrency/getDepositSaving",
                        data: { cateid: val_cate, currencyid: val_currencyid, balance: val, month: val_month },
                        dataType: "json",
                        success: function (rvdata) {
                            var htmlcode = "";
                            if (rvdata.length > 0) {
                                $(rvdata).each(function (index, item) {
                                    if (val_cate == 1) {
                                        if (val_currencyid == 1) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD.toString().replace(".", ",") + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = Math.pow(1 + ((item.InterestUSD) / 100 / 12), val_month);
                                                var ina = Math.round(parseFloat(lai * ba));
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ",", ".")) + "</p>";
                                                }
                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Chi phí</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Thông tin thêm</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else if (val_currencyid == 2) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestEUR != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR.toString().replace(".", ",") + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = Math.pow(1 + ((item.InterestEUR) / 100 / 12), val_month);
                                                var ina = Math.round(parseFloat(lai * ba));
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ".")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Chi phí</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Thông tin thêm</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else { }

                                    }
                                    else {
                                        if (val_currencyid == 1) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD.toString().replace(".", ",") + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = val * val_month * ((item.InterestUSD) / 100 / 12);
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ",", ".")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Chi phí</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Thông tin thêm</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else if (val_currencyid == 2) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='Xem chi tiết' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                htmlcode += " <p style='text-align: center;'>" + val_month + " tháng</p>";
                                            }
                                            else {
                                                htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " năm</p>";
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR.toString().replace(".", ",") + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = val * val_month * ((item.InterestEUR) / 100 / 12);
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ",", ".")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Vui lòng nhấp vào nút tham gia để liên hệ với chúng tôi</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Tham gia >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='Xem thêm'>Xem thêm</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Quyền lợi & Tính năng</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Chi phí</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Thông tin thêm</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else { }
                                    }
                                });
                            }// lenght
                            else {
                                htmlcode += "<tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>Không có dữ liệu phù hợp</p></td></tr>";
                                $("#product-table tbody").html(htmlcode);
                            }
                            $("#product-table tbody").html("");
                            $("#product-table tbody").append(htmlcode);
                            $("#product-table").trigger("update");
                            $('tbody > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
                        }
                    });
                }
            });
            val_month = $("#slider_year").slider("value");
        }
        else {
            $("#slider_year").slider({
                value: 12,
                min: 1,
                max: 16,
                step: 1,
                slide: function (event, ui) {
                    var AppUrl = $("#AppUrl").text();
                    val = $("#amount-currency").val().replace(",", "").replace(",", "");
                    var val_cate = parseInt($("#rel_cate").attr("rel"));
                    var values = ui.value;
                    if (values < 12) {
                        $("#month-currency").val(values);
                        $("#years-currency").val(0);
                        val_month = $("#month-currency").val();
                    }
                    else {
                        $("#years-currency").val(values - 11);
                        $("#month-currency").val(0);
                        val_month = (values - 11) * 12;
                    }
                    var val_currencyid = parseInt($("#select-currency").attr("rel"));
                    var lai = 0;
                    var lang = $("#CurrentLangCode").html();
                    var ba = parseFloat(val);
                    $.ajax({
                        type: "post",
                        url: AppUrl + "/DepositSavingCurrency/getDepositSaving",
                        data: { cateid: val_cate, currencyid: val_currencyid, balance: val, month: val_month },
                        dataType: "json",
                        success: function (rvdata) {
                            var htmlcode = "";
                            if (rvdata.length > 0) {
                                $(rvdata).each(function (index, item) {
                                    if (val_cate == 1) {

                                        if (val_currencyid == 1) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                if (val_month == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                                }
                                            }
                                            else {
                                                if (val_month / 12 == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                                }
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = Math.pow(1 + ((item.InterestUSD) / 100 / 12), val_month);
                                                var ina = Math.round(parseFloat(lai * ba));
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ",")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Benefit & Feature</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Fees</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>More Infomation</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else if (val_currencyid == 2) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                if (val_month == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                                }
                                            }
                                            else {
                                                if (val_month / 12 == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                                }
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestEUR != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = Math.pow(1 + ((item.InterestEUR) / 100 / 12), val_month);
                                                var ina = Math.round(parseFloat(lai * ba));
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(ina) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(ina, 0, ".", ",")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Benefit & Feature</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Fees</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>More Infomation</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else { }

                                    }
                                    else {

                                        if (val_currencyid == 1) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                if (val_month == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                                }
                                            }
                                            else {
                                                if (val_month / 12 == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                                }
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestUSD != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestUSD + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = val * val_month * ((item.InterestUSD) / 100 / 12);
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ".", ",")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Benefit & Feature</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Fees</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>More Infomation</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else if (val_currencyid == 2) {
                                            htmlcode += "<tr>";
                                            htmlcode += " <td class='td-bank-saving'>";
                                            htmlcode += " <a title='View Detail' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.SavingCurrencyName).toLowerCase() + "/" + item.SavingCurrencyID + "'><img src='/Content/UpLoad/Images/" + item.CompanyImg + "' /></a>";
                                            htmlcode += "<p class='bank-title'><a title='" + item.CompanyName + "' href='" + AppUrl + "/foreign-currency-saving/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "'>" + item.CompanyName + "</a>" + item.SavingCurrencyName + "</p>";
                                            htmlcode += " </td>";
                                            htmlcode += " <td style='vertical-align:middle;'>";
                                            htmlcode += "	<p style='text-align:center;'>" + item.MinimumBalance.replace(".", ",").replace(".", ",").replace(".", ",") + "</p>";
                                            htmlcode += "</td>";
                                            htmlcode += " <td style='vertical-align: middle;'>";
                                            if (val_month < 12) {
                                                if (val_month == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " month</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month + " months</p>";
                                                }
                                            }
                                            else {
                                                if (val_month / 12 == 1) {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " year</p>";
                                                }
                                                else {
                                                    htmlcode += " <p style='text-align: center;'>" + val_month / 12 + " years</p>";
                                                }
                                            }
                                            htmlcode += "  </td>";
                                            if (item.InterestEUR != 0) {
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                htmlcode += "<p class='highlight-blue text-p'>" + item.InterestEUR + " %</p>";
                                                htmlcode += " </td>";
                                                htmlcode += " <td style='vertical-align:middle;'>";
                                                lai = val * val_month * ((item.InterestEUR) / 100 / 12);
                                                if (ina < 999) {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + Math.round(lai + ba) + "</p>";
                                                }
                                                else {
                                                    htmlcode += "<p class='highlight-blue text-p'>" + (number_format(lai + ba, 0, ".", ",")) + "</p>";
                                                }

                                                htmlcode += " </td>";
                                            }
                                            else {
                                                htmlcode += " <td style='vertical-align:middle;' colspan='2'>";
                                                htmlcode += "<p class='highlight-blue-1 text-p'>Please kindly click on \"Apply\" button to contact us</p>";
                                                htmlcode += " </td>";
                                            }
                                            htmlcode += " <td class='td-btn'>";
                                            htmlcode += "	<a class='btn-app' href='" + AppUrl + "/foreign-currency-saving/apply/" + item.SavingCurrencyID + "'>Apply >></a>";
                                            htmlcode += "<a href='#" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-link' onclick='return viewmore(this)' title='More Info'>More Info</a>";
                                            htmlcode += "</td>";
                                            htmlcode += " </tr>";
                                            htmlcode += "</tr>";
                                            htmlcode += "<tr id='" + convertounsign(item.SavingCurrencyName.toLowerCase()) + "-" + item.SavingCurrencyID + "' class='more-info' style='display: none;'>";
                                            htmlcode += "<td colspan='6'>";
                                            htmlcode += " <div class='more-info-top' >";
                                            htmlcode += " <div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Benefit & Feature</h4>";
                                            htmlcode += "<div class='item-list'>";
                                            htmlcode += item.Benefit;
                                            htmlcode += "</div>";
                                            htmlcode += "</div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>Fees</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.FeeContent;
                                            htmlcode += "</div>";
                                            htmlcode += " </div>";
                                            htmlcode += "<div class='more-info-wrapper'>";
                                            htmlcode += "<h4>More Infomation</h4>";
                                            htmlcode += " <div class='item-list'>";
                                            htmlcode += item.MoreInfo;
                                            htmlcode += "</div>  ";
                                            htmlcode += " </div>";
                                            htmlcode += "</div>";
                                            htmlcode += "</td>";
                                            htmlcode += "</tr>";
                                        }
                                        else { }
                                    }
                                });
                            }// lenght
                            else {
                                htmlcode += "<tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>No result</p></td></tr>";
                                $("#product-table tbody").html(htmlcode);
                            }
                            $("#product-table tbody").html("");
                            $("#product-table tbody").append(htmlcode);
                            $("#product-table").trigger("update");
                            $('tbody > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
                        }
                    });
                }
            });
            val_month = $("#slider_year").slider("value");
        }
    });
</script>
<script src="@Url.Content("~/content/js/jquery.tablesorter.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("#product-table").tablesorter({ headers: { 5: { sorter: false }, 1: { sorter: false } }, widthFixed: true, widgets: ['zebra'] });

    });
</script>

<div id="v3HomeBody">
    <div class="bread_crumb">
        <ul>
            <li><a href="/" class="bread_arrow" title="@FOResource.UI.Layout.lblhome">@FOResource.UI.Layout.lblhome</a></li>
            <li><a href="@Url.Action("Index", "DepositSavingCurrency")" class="bread_arrow" title="@FOResource.UI.Product.Deposit.depositsavingcurrency">@FOResource.UI.Product.Deposit.depositsavingcurrency</a></li>
            <li class="lastli"><a href="@Url.Action("Index", "DepositSavingCurrency")" class="bold" title="@FOResource.UI.Product.Deposit.selectpro">@FOResource.UI.Product.Deposit.selectpro</a></li>
        </ul>
    </div>
    <!--Close Bread crumb-->

    <!--Open Top Slider-->
    <div class="top_slider" id="afocus">
        <ol class="top_bar">
            <li style="width: 164px;"><a href="@Url.Action("Index", "DepositSavingCurrency")" class="active" id="show_div"><span style="left: -13px;">@FOResource.UI.Layout.lblchoose</span></a> </li>
            <li style="width: 164px;"><a class="bar_2"><span style="left: -13px;">@FOResource.UI.Layout.lblinfo</span></a></li>
            <li style="width: 60px;"><a class="bar_3"><span style="left: -13px;">@FOResource.UI.Layout.lblcontract</span></a></li>
        </ol>
        <span class="h1replace">...</span>

    </div>
    <div class="clear"></div>
    <div class="pane-content">

        <div id="home-loan-calculator">
            <div id="calculator-form">
                <form>
                    <h3>@FOResource.UI.Product.Deposit.moneytosaving</h3>
                    <div id="amount-wrapper">
                        <div class="slider1" id="slider_amount">
                            <div class="progress"></div>
                        </div>
                        <input type="text" style="width: 75px;" class="amount" name="amount" rel="200" id="amount-currency" /><span id="currency-symbol" class="suffix"> USD</span>
                    </div>
                    <div class="clear"></div>
                    <h3>@FOResource.UI.Product.Deposit.timetosaving</h3>
                    <div id="tenure-wrapper">
                        <div class="slider1" id="slider_year" style="width: 270px !important;">
                            <div class="progress"></div>
                        </div>
                        <input type="text" class="years" value="1" name="years" id="years-currency" /><span class="suffix"> @FOResource.UI.Layout.years</span>
                        <input type="text" class="years" value="0" name="month" id="month-currency" style="margin-left: 0px;" /><span class="suffix"> @FOResource.UI.Product.Deposit.month</span>
                    </div>
                </form>
            </div>
            <div id="home-loan-tips">
                <div style="float: left;">
                    <h3>@FOResource.UI.Layout.formsofsaving</h3>
                    <span style="float: left; width: 230px; margin-bottom: 5px;">
                        @if (Cate.Count > 0)
                        {
                            foreach (var ca in Cate)
                            {

                                if (i == 1)
                                {
                            <span id="rel_cate" rel="@ca.SavingDepositCategoryID"></span>
                            <label>
                                <input type="radio" onchange="return ajaxcatecurrencyid('@ca.SavingDepositCategoryID')" checked="checked"  name="features" value="@ca.SavingDepositCategoryID" />
                                @ca.SavingDepositCategoryName</label>
                            <br />
                                }
                                else
                                {
                            <label>
                                <input type="radio" name="features" onchange="return ajaxcatecurrencyid('@ca.SavingDepositCategoryID')" value="@ca.SavingDepositCategoryID" />
                                @ca.SavingDepositCategoryName</label>
                            <br />
                                }
                                i = i + 1;


                            }
                        }


                    </span>

                </div>
                <div style="float: left;">
                    <h3>@FOResource.UI.Product.Deposit.selectcurrency</h3>

                    <span style="float: left; width: 185px;">
                        @FOResource.UI.Product.Deposit.typecurrency
                        <select id="select-currency" rel="1" onchange="return displayResult(this)">
                            @if (currency.Count > 0)
                            {
                                foreach (var c in currency)
                                {
                                <option text="@c.CurrencyCateSymbol" value="@c.CurrencyCateID">@c.CurrencyCateSymbol</option> 
                                }
                            }
                        </select>

                    </span>
                </div>

                <div class="clr"></div>
                <div class="social-like">
                    <div class="vnlike-fb">
                        <div class="fb-like" data-href="@Request.Url.AbsoluteUri" data-width="450" data-layout="button_count" data-show-faces="true" data-send="true"></div>
                    </div>
                    <div class="vnlike-google">
                        <div class="g-plusone" data-size="medium" data-href="@Request.Url.AbsoluteUri"></div>
                    </div>
                    <div class="clr"></div>
                </div>
            </div>
        </div>
        <table class="product-table" id="product-table">
            <thead>
                <tr>
                    <th style="width: 25%;">@FOResource.UI.Product.Card.lblbank</th>
                    <th id="th-currency-min" style="width: 15%;">@FOResource.UI.Product.Deposit.minideposit1
                        <br />
                        (USD)</th>
                    <th style="width: 13%;">@FOResource.UI.Layout.term</th>
                    <th style="width: 14%;">@FOResource.UI.Product.Deposit.interest<br />@FOResource.UI.Product.Deposit.peryear</th>
                    <th id="th-currency-rate" style="width: 17%;">@FOResource.UI.Product.Deposit.totalinterest @FOResource.UI.Product.Deposit.inaterm (USD)</th>
                    <th style="width: 13%;">@FOResource.UI.Product.Card.lblapply1</th>
                </tr>
            </thead>
            <tbody id="saving-currency">
                @if (saving.Count > 0)
                {
                    foreach (var l in saving)
                    {
                       
                   
                    <tr>

                        <td class="td-bank-saving">
                            <a title="@FOResource.UI.Layout.viewdetail" href="@Url.Action("Detail", "DepositSavingCurrency", new { CompanyName = FO.Models.Conver.ConvertToUnSign(l.CompanyName).ToLower(), SavingCurrencyName = FO.Models.Conver.ConvertToUnSign(l.SavingCurrencyName).ToLower(), SavingCurrencyID = l.SavingCurrencyID })">
                                <img alt="" src="@Url.Content("~/Content/UpLoad/Images/" + l.CompanyImg + "")" /></a>
                            <p class="bank-title"><a title="@l.CompanyName" href="@Url.Action("TermSavingByProvider", "DepositSavingCurrency", new { CompanyName = FO.Models.Conver.ConvertToUnSign(l.CompanyName).ToLower(), CompanyID = l.CompanyID })">@l.CompanyName</a>@l.SavingCurrencyName</p>
                        </td>
                        <td style="vertical-align: middle;">
                            <p style="text-align: center;">@l.MinimumBalance.Replace(".", "" + FOResource.UI.Layout.currency + "")</p>
                        </td>
                        <td style="vertical-align: middle;">
                            <p style="text-align: center;">1 @FOResource.UI.Layout.years1</p>
                        </td>
                        @if (l.InterestUSD != 0)
                        {
                            lai = Math.Pow((1 + (l.InterestUSD / 100 / 12)), 12) * 1000000;
                     
                            <td style="vertical-align: middle;">
                                <p class="highlight-blue text-p">@l.InterestUSD.ToString().Replace(".", "" + FOResource.UI.Layout.currency1 + "") %</p>

                            </td>
                            <td style="vertical-align: middle;">
                                @if (lai < 999)
                                {
                                    <p class="highlight-blue text-p">@Math.Round(lai)</p>
                                }
                                else
                                {
                                    <p class="highlight-blue text-p">@String.Format("{0:0,0}", lai).Replace(".", "" + FOResource.UI.Layout.currency + "")</p>
                                }

                            </td>
                        }
                        else
                        {
                            <td style="vertical-align: middle;" colspan="2">
                                <p class="highlight-blue-1 text-p">@FOResource.UI.Layout.applyplease</p>
                            </td>
                        }
                        <td class="td-btn">
                            @Html.ActionLink("" + FOResource.UI.Product.Card.lblapply + "", "DepositSavingCurrencyInfo", "DepositSavingCurrency", new { SavingCurrencyID = l.SavingCurrencyID }, new { @class = "btn-app", rel = "" + l.SavingCurrencyID + "" })
                            <a href="#@FO.Models.Conver.ConvertToUnSign(l.SavingCurrencyName).ToLower()-@l.SavingDepositCategoryID" class="more-link" onclick="return viewmore(this)" title="@FOResource.UI.Layout.moreinfo">@FOResource.UI.Layout.moreinfo</a>
                        </td>

                    </tr>
                    <tr id="@FO.Models.Conver.ConvertToUnSign(l.SavingCurrencyName).ToLower()-@l.SavingDepositCategoryID" class="more-info" style="display:none;">
                        <td colspan="6">
                            <div class="more-info-top">
                                <div class="more-info-wrapper">
                                    <h4>@FOResource.UI.Product.Card.lblbenefit &amp; @FOResource.UI.Product.Card.lblfeatures</h4>
                                    <div class="item-list">
                                        @Html.Raw(l.Benefit)
                                    </div>
                                </div>
                                <div class="more-info-wrapper">
                                    <h4>@FOResource.UI.Layout.fee</h4>
                                    <div class="item-list">
                                        @Html.Raw(l.FeeContent)
                                    </div>

                                </div>
                                <div class="more-info-wrapper">
                                    <h4>@FOResource.UI.Layout.moreinfomation</h4>
                                    <div class="item-list">
                                        @Html.Raw(l.MoreInfo)

                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr> 
                        lai = 0;
                    }
                }
            </tbody>
        </table>
        <!--Close Form Info-->
        <div class="bot-main">
            <div class="bottom_tabbed" style="float: left; width: 960px; margin-bottom: 30px;">
                <div class="bottom_center">
                    @Html.Raw(ProDes.Description)
                </div>
                <div class="clr"></div>
                <p id="vnquestion-fb">@FOResource.UI.Layout.cmt</p>
                <div style="float: left;">

                    <div class="clr"></div>
                    <div id="fb-root"></div>
                    <div class="fb-comments" data-href="@Request.Url.AbsoluteUri" data-width="645" style="margin-right:10px;"></div>
                </div>

                <div style="float: left;">

                    <div id="vnbanknet-facebook" style="margin: 0;">
                        <div class="fb-like-box" data-href="http://facebook.com/vnbanknet" data-width="300" data-height="270" data-show-faces="true" data-header="false" data-stream="false" data-show-border="false"></div>
                    </div>
                </div>

            </div>

            <div class="clr"></div>
        </div>


    </div>
</div>
